<?php
require '../mysql_connection/for_u_lijinsheng.php';
$first = true;
if (isset ( $_GET ['username'] )) {
	$first = false;
	$username = $_GET ['username'];
	$password = $_GET ['password'];
	$confirm_password = $_GET ['confirm_password'];
	if (($password == $confirm_password)) {
		if (register ( $username, $password )) {
			header("location:log_in.php");
		}
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../u_css/register.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>注册</title>
</head>
<body>
<h1>Welcome to our shop online</h1>
<div id="register_div">
<form action="register.php">
<div><label> 用户名:<input type="text" name="username" id="username" /> </label>
<br />
<label> 密码:<input type="password" name="password" id="password" /> </label>
<br />
<label> 确认密码:<input type="password" name="confirm_password"
	id="confirm_password" /> </label> <br />
<input type="submit" id="submitbutton" value="注册" /></div>
</form>
<?php
if (! $first) {
	?>
<p class="notify">注册失败</p>
<?php
}
?>
</div>
</body>
</html>